{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import steward as st\n",
    "import matplotlib.pyplot as plt\n",
    "import pickle\n",
    "import xgboost\n",
    "from sklearn.metrics import roc_auc_score\n",
    "%matplotlib inline\n",
    "from src import build\n",
    "from src import test, config\n",
    "from src.feature_cols import to_drop\n",
    "import h5py"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "build.build_all()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "feature_list = [\n",
    "#     'basic_preprocess/cont_r_train_30W',\n",
    "#     'basic_preprocess/cont_train_all',\n",
    "#     'basic_preprocess/conc_train_all',\n",
    "    \n",
    "#     'index/index_train_30W'\n",
    "    \n",
    "#     'feature/rank1_train_all',\n",
    "#     'feature/rank2_train_all',\n",
    "#     'feature/rank3_train_all',\n",
    "    \n",
    "#     'feature/history1_train_all',\n",
    "#     'feature/history2_train_all',\n",
    "#     'feature/history3_train_all',\n",
    "    'feature/ordnum_train_all',\n",
    "    \n",
    "    'feature/room1_train_all',\n",
    "    'feature/basicroom1_train_all',\n",
    "    'feature/orderroom1_train_all',\n",
    "    \n",
    "    'feature/rank_history1_train_all',\n",
    "    'feature/rank_history2_train_all',\n",
    "    'feature/rank_history3_train_all',\n",
    "]\n",
    "\n",
    "y = 'basic_preprocess/y_train_all'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "st.default.manager.load_and_save_to_hdf5(feature_list, 'train.hdf5', save_columns=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "feature_list = [\n",
    "#     'basic_preprocess/cont_r_train_30W',\n",
    "\n",
    "#     'basic_preprocess/cont_test_all',\n",
    "#     'basic_preprocess/conc_test_all',\n",
    "    \n",
    "#     'index/index_train_30W'\n",
    "    \n",
    "#     'feature/rank1_test_all',\n",
    "#     'feature/rank2_test_all',\n",
    "#     'feature/rank3_test_all',\n",
    "    \n",
    "#     'feature/history1_test_all',\n",
    "#     'feature/history2_test_all',\n",
    "#     'feature/history3_test_all',\n",
    "\n",
    "#     'feature/ordnum_test_all',\n",
    "    \n",
    "#     'feature/room1_test_all',\n",
    "#     'feature/basicroom1_test_all',\n",
    "#     'feature/orderroom1_test_all'\n",
    "    \n",
    "#     'feature/rank_history1_test_all',\n",
    "#     'feature/rank_history2_test_all',\n",
    "#     'feature/rank_history3_test_all',\n",
    "    \n",
    "    'feature/room1head5_test_all',\n",
    "    'feature/room1small5_test_all',\n",
    "    'feature/room1large5_test_all',\n",
    "    'feature/orderroom1head5_test_all',\n",
    "    'feature/orderroom1small5_test_all',\n",
    "    'feature/orderroom1large5_test_all',\n",
    "\n",
    "    'feature/custom1_test_all',\n",
    "    'feature/roomcount_date_test_all',\n",
    "\n",
    "]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "st.default.manager.load_and_save_to_hdf5(feature_list, 'test.hdf5', save_columns=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "st.list_instance()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [conda root]",
   "language": "python",
   "name": "conda-root-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
